import useServer from "server";
import { EpicType } from "types";
import { useQuery } from "react-query";

export const useEpics = (param?: Partial<EpicType>) => {
  const client = useServer();

  return useQuery<EpicType[]>(["epics", param], () => {
    return client("epics", { data: param });
  });
};
